CREATE TABLE `SRTrade`.`MsgSRParentReport` (
`parentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SPDR order number',
`sysRealm` ENUM('None','SysTest','NMS','CME','FR2','LD4','DR') NOT NULL DEFAULT 'None',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`runStatus` ENUM('None','Prod','Beta','UAT','SysTest') NOT NULL DEFAULT 'None',
`reportNumber` BIGINT NOT NULL DEFAULT 0,
`parentShape` ENUM('None','Single','Cross','MLeg','MLegCross') NOT NULL DEFAULT 'None',
`recordVersion` SMALLINT NOT NULL DEFAULT 0,
`recordSource` ENUM('None','NewOrder','CancelReplace','CancelRequest','ExecReport','CancelReject','TerminalRec') NOT NULL DEFAULT 'None',
`parentVersion` SMALLINT NOT NULL DEFAULT 0 COMMENT 'SPDR order instance number (1 = original order; 2 = 1st cancel/replace, etc)',
`baseParentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SPDR order number (initial number in cancel/replace sequence) (also, source parent for dynamically generated orders;eg auto-hedges)',
`prevParentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SPDR order number (order being cancelled/replaced) (zero if none)',
`nextParentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SPDR order number (next order in cxl/replace sequence) (zero if none)',
`prevParentCreateDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'none/undefined if first order in a sequence',
`prevParentCumFillQty` INT NOT NULL DEFAULT 0,
`clientSeqNumIn` INT NOT NULL DEFAULT 0 COMMENT 'inbound client seq number (FIX orders only)',
`altOrderId` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'usually client clOrdId (from FIX or SRSE)',
`altPrevOrderId` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'usually previous/orig (cxl/repl) client clOrdId (from FIX or SRSE)',
`altCancelId` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'client cancelId (from FIX or SRSE) [identifies the message responsible for user cxl actions]',
`srcRoutingCode` TINYTEXT NOT NULL DEFAULT '' COMMENT 'inbound FIX routing code, if any',
`packageId` BIGINT NOT NULL DEFAULT 0 COMMENT 'references spread orderNumber, if a legged spread order',
`prevPackageId` BIGINT NOT NULL DEFAULT 0,
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'all orders with the same riskGroupId share a common set of risk counters; .Grp. risk limits apply to these shared counters',
`triggerGroupId` BIGINT NOT NULL DEFAULT 0 COMMENT 'WaitTrigger group Id',
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_xx` DOUBLE NOT NULL DEFAULT 0,
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR trading account',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`coreClientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`sponsorClientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`clientAccnt` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'client assigned "long" account string (from AccountConfig) [used to map between client and SR account strings]',
`userName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'name of the user entering the order',
`userSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None' COMMENT 'SpdrSource of this order',
`altAccnt` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings]',
`altUserName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'alternate (client assigned) user name (optional) [used to map between client and SR account strings]',
`execBrkrCode` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'overrides the default executing broker for this parent order',
`externExDest` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'routing code for orders directed to an external order router (default = null); must match an exDest associated with a RouteDefinition',
`externParams` TINYTEXT NOT NULL DEFAULT '' COMMENT 'external algo names/parameters (usually just an algo name)',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None' COMMENT 'parent order source enum',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'unique broker code; broker.pkey = (key + accnt + spdrSource + groupingCode)',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'execution engine (partition) handling this parent order',
`orderDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`orderSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`priceType` ENUM('None','Explicit','Offset','Zero') NOT NULL DEFAULT 'None',
`orderSize` INT NOT NULL DEFAULT 0,
`orderActiveSize` INT NOT NULL DEFAULT 0 COMMENT 'total activated size (total size released for execution) (-1 = all available size)',
`spdrStageType` ENUM('None','ModifyAny','ModifyAlgo') NOT NULL DEFAULT 'None' COMMENT 'SizeLock = stage pending modification (can reduce size); SizeModify = stage pending modification (can increase/reduce size)',
`stageReview` ENUM('None','Strict','Normal') NOT NULL DEFAULT 'None',
`parentOrderHandling` ENUM('None','ActiveTaker','PostOnly','DMA','MktOnOpn','MktOnCls','Facilitate','Matrix','Legger','Seeker','SeekerLegger','CrossResponse','AuctionResponse','MLegAuctionResp','RFQRequest','AwayAlgo','ExchPing','BlockAuction','BlockResponse','SweepTake','CobMaker','FaceOmni','TestParent') NOT NULL DEFAULT 'None',
`parentBalanceHandling` ENUM('None','PostWith','PostTurn','PostImprove','PostLimit','MaxIntern','PostWthF','PostImprvR','PostFlash','PostFlashW','PostPeg','PostFlashI') NOT NULL DEFAULT 'None',
`limitPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'limit price @ order arrival',
`orderLimitType` ENUM('None','Market','MarketArrival','Prc','PrcDe','PrcDeX','PrcDeT','PrcDeP','PrcDeXT','PrcDeXP','Vol','VolX','PrcV','PrcVX','NoLimit','RelMid','RelJoin','RelCross','SmrtFast','SmrtNorm','RelTurn','PrcDeEm','VolEm','Aux','UPrcPct','PkgNeutral','RcPrem','SynthLimitMM','SynthLimitBW','SynthLimitWW') NOT NULL DEFAULT 'None',
`takeLimitClass` ENUM('Simple','Surface','Probability','SurfProb') NOT NULL DEFAULT 'Simple',
`makeLimitClass` ENUM('Simple','Surface','Probability','SurfProb') NOT NULL DEFAULT 'Simple',
`startType` ENUM('None','WaitTrigger','TriggerAll') NOT NULL DEFAULT 'None' COMMENT 'WaitTrigger associates this order with a triggerGroupId. The initial wave of child orders from the TriggerGroup will be simultaneously delivered when a trigger signal is received.',
`marketSession` ENUM('None','PreMkt','RegMkt','PostMkt','PreRegMkt','RegPostMkt','AllDay') NOT NULL DEFAULT 'None',
`activeDuration` INT NOT NULL DEFAULT 0,
`startDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT '[optional] (default: 2000-01-01)',
`goodTillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT '[optional] (default: 2099-01-01)',
`autoHedge` ENUM('None','Static','AutoMid','AutoCrx','AutoTrn','SpdrAuto','Spdr10S','Spdr30S','Spdr90S','Spdr5M','Spdr30M','SpdrDay','SmartFast','SmartNorm','FastCrx','FastDark','SlowDark','AlphaVwap1pct','AlphaVwap2pct','AlphaVwap5pct','AlphaVwap25pct','Custom','AwayAlgo') NOT NULL DEFAULT 'None',
`hedgeInstrument` ENUM('None','Default','FrontMonth','Stock','Future') NOT NULL DEFAULT 'None' COMMENT 'Default=underlier (EQT or FUT) [Index Options use ETF]; FrontMonth=underlier (EQT) or front month (FUT) [Index Options use FM Fut]; Stock=hedgeSecKey; Future=hedgeSecKey',
`hedgeSecKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`hedgeSecKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`hedgeSecKey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`hedgeSecKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`hedgeSecKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`hedgeSecKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`hedgeSecType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`hedgeBetaRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'portion of executed $money to auto-hedge (can be 1.0 / Beta for beta hedging) [-4.0 to +4.0])',
`hedgeScope` ENUM('None','Accnt','RiskGroup') NOT NULL DEFAULT 'None' COMMENT 'hedge group scope [RiskGroup or Accnt]',
`hedgeSession` ENUM('None','PreMkt','RegMkt','PostMkt','PreRegMkt','RegPostMkt','AllDay') NOT NULL DEFAULT 'None' COMMENT 'market session for the autohedge order',
`orderCreateDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'order send time',
`orderCreateLatency` FLOAT NOT NULL DEFAULT 0 COMMENT 'order send to order ack latency (in milliseconds)',
`cancelReason` ENUM('None','UserCxl','SpdrCxl') NOT NULL DEFAULT 'None',
`orderCancelDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'order cancel time',
`orderCancelLatency` FLOAT NOT NULL DEFAULT 0 COMMENT 'cancel send to cancel ack latency (in milliseconds)',
`orderWorkingDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'order send ack time (acknowleged working/new) (first exec report indicating the order is active)',
`orderClosedDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'order terminated ack time (first exec report indicating the order is in a terminal state;eg. cancelled, filled, rejected, etc)',
`orderClosedText` TINYTEXT NOT NULL DEFAULT '',
`maxExposureSize` INT NOT NULL DEFAULT 0 COMMENT 'maximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1]',
`publicSize` ENUM('None','Randomize','MktSize','FullSize','MktSizeA','MktSizeB','MktSizeC','FullSizeR','Max25Pct','Max50Pct','Max75Pct','NoSize') NOT NULL DEFAULT 'None' COMMENT 'public order size handling: None=algo default; Randomize=randomize public size; MktSize=expose typical market size; FullSize=expose entire order size where possible; FullSizeR=randomize full size',
`canOverlapCxlRepl` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'can execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order)',
`progressExposeTime` INT NOT NULL DEFAULT 0 COMMENT 'minimum time (secs) to expose order (0 = no minimum; used to guarantee that the order is exposed at mid-market for some time before actively taking)',
`progressRule` ENUM('None','Twap','Vwap','TwapReset','VwapReset','FastReset','SlowReset','TwapAlpha','VwapAlpha','TwapAlphaC','VwapAlphaC','AutoComplete','AllowImmediate','Manual','SpdrPulse','IOC') NOT NULL DEFAULT 'None' COMMENT 'Immediate = all size immediately available; TWAP = work from arrival to expiration; VWAP = work order not faster than participation rate',
`progressSliceCnt` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of slices to use (default = 4 or 8) [max 20]',
`vwapParticipation` FLOAT NOT NULL DEFAULT 0 COMMENT 'target vwap participation rate (target % of trade activity)',
`auctionResponder` ENUM('None','Any') NOT NULL DEFAULT 'None' COMMENT 'if set, parent order can be an auction responder',
`maxMakeExchFee` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum making exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]',
`maxTakeExchFee` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum taking exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply]',
`incTakeExchFee` ENUM('None','ExclFee','IncFee') NOT NULL DEFAULT 'None' COMMENT 'include exchange fee in probability and surface based take limit calculations',
`incMakeExchFee` ENUM('None','ExclFee','IncFee') NOT NULL DEFAULT 'None' COMMENT 'include exchange fee in probability and surface based make limit calculations',
`makeExchRule` ENUM('None','MaxPart','FeeOptimal','ImprvOnly','FeeStrict','RoundRobin','ProRataOptim') NOT NULL DEFAULT 'None' COMMENT 'ActiveMaker exchange preference rule: ''MaxPart'' = maximize participation; ''FeeOrder'' = minimize fees [maximize rebates]; ''ImprvOnly'' will only make when improving NBBO; ''RoundRobin'' will rotate through exch list',
`cxlUPrcRange` ENUM('None','Yes','No','YesHalt','NoHalt') NOT NULL DEFAULT 'None' COMMENT 'cancel parent order if/when outside the uPrice range [ _Halt = also cancel if halted ]',
`minUBid` FLOAT NOT NULL DEFAULT 0 COMMENT '[optional]',
`maxUAsk` FLOAT NOT NULL DEFAULT 0 COMMENT '[optional] (< $0.01 = none)',
`minOptionPx` FLOAT NOT NULL DEFAULT 0 COMMENT '[optional] option price floor for tied to stock orders',
`maxChildOrders` INT NOT NULL DEFAULT 0 COMMENT 'maximum number of child orders that can be generated by this parent order [order will terminate if/when this cap is reached;zero or neg = unlimited]',
`orderDuration` INT NOT NULL DEFAULT 0 COMMENT '[optional] (number of seconds)',
`takeReachRule` ENUM('None','Delayed','Passive','WeakOnly','RespondOnly','FullSize','ISOSweep','AllOrNone','QtyOrMore','UpToQty','AtMost25','AtMost50','MinTakeFee') NOT NULL DEFAULT 'None' COMMENT 'Immediate = reach room immediately available; Delayed = available after [1-3] seconds; Passive = available if contra side aggresses; WeakOnly = only take if available size < avgMarketSize; ISOSweep = Intermarket Sweep [requires WaitTrigger]',
`orderPrcLimit` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Applies if LimitType = Prc[]',
`orderRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=underlier.mid',
`orderRefDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=option.delta',
`orderRefGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=option.gamma',
`orderVolLimit` FLOAT NOT NULL DEFAULT 0 COMMENT 'Applies if LimitType = Vol[] [uses SR dividends and borrow rates]',
`rateOverride` FLOAT NOT NULL DEFAULT 0 COMMENT 'zero = ignore; > zero = override',
`sdivOverride` FLOAT NOT NULL DEFAULT 0,
`ddivOverride` TINYTEXT NOT NULL DEFAULT '' COMMENT 'discrete dividend string override ([yearsToExpiry,divYears:divAmount,divYears:divAmount, ...])',
`overrideCode` ENUM('None','SDivOnly','DDivOnly','Both') NOT NULL DEFAULT 'None',
`orderPrcOffset` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=0 [surface, relX and pegX limit offsets]',
`takeAlphaType` ENUM('None','Static','Eagle','Hawk','Falcon','Relative') NOT NULL DEFAULT 'None' COMMENT 'Applies if takeLimitClass = Probability',
`makeAlphaType` ENUM('None','Static','Eagle','Hawk','Falcon','Relative') NOT NULL DEFAULT 'None' COMMENT 'Applies if makeLimitClass = Probability',
`takeAlphaFactor` FLOAT NOT NULL DEFAULT 0 COMMENT '[-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if AlphaType = Relative]',
`makeAlphaFactor` FLOAT NOT NULL DEFAULT 0 COMMENT '[-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if AlphaType = Relative]',
`takeProbability` FLOAT NOT NULL DEFAULT 0 COMMENT 'takeProbLimit = takeProbability [if AlphaType = Static]',
`makeProbability` FLOAT NOT NULL DEFAULT 0 COMMENT 'makeProbLimit = makeProbability [if AlphaType = Static]',
`takeSurfPrcOffset` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=0',
`takeSurfVolOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=0',
`takeSurfWidthOffset` FLOAT NOT NULL DEFAULT 0 COMMENT '[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth',
`makeSurfPrcOffset` DOUBLE NOT NULL DEFAULT 0 COMMENT 'default=0',
`makeSurfVolOffset` FLOAT NOT NULL DEFAULT 0 COMMENT 'default=0',
`makeSurfWidthOffset` FLOAT NOT NULL DEFAULT 0 COMMENT '[-1.x to +1.x] -1.0 = -0.5 * avgMktWidth, +1.0 = +0.5 * avgMktWidth',
`orderRefEventMult` FLOAT NOT NULL DEFAULT 0,
`orderRefEventDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`externHedgeExDest` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'external broker exDest (only used if orderHandling=Extern) # Should match FixRoutingTable.destination type (eg. #Nighthawk)',
`externHedgeParams` TINYTEXT NOT NULL DEFAULT '' COMMENT 'external algo names/parameters (usually just an algo name) # usually copied from the FixRoutingTable.externParams',
`spdrOrderStatus` ENUM('PendNew','New','PendClose','Closed','Rejected','SendReject') NOT NULL DEFAULT 'PendNew',
`spdrCloseReason` ENUM('None','Cancelled','Filled','Replaced','Expired','Limit','System','LegReject','DoneForDay','IOCExpire','UserCxl','NoProgress','TooManyRej','ReplReject','AlgoClose','Restart','InvldParentLimit','FilledRepl','ForceClose','DmaReject','DmaExpire','DmaBrkrCxl','ReviewReject','MarketState','AlgoReject','ReviewTimeout','ChildReject','ChildCancel','ReviewClose','UPrcRange','LegBrkrClosed','ExchRisk','CrossFailed') NOT NULL DEFAULT 'None',
`spdrRejectReason` ENUM('None','AccntHold','UnknwnOpt','UnknwnStk','Expired','BadSize','BadOrdNum','DupOrdNum','BadVolPx','BadLmtType','BadMktPrc','BadLimit','SysReject','TestOrder','CustType','NoFirmPos','BadCent','NoSurface','UnknwnAcc','UnknwnRoot','OrdSpacing','BadOptMkt','BadStkMkt','SendFailed','BadExpose','BadPrem','NoOptLeg','Min2Leg','Max6Leg','BadStkSz','BadRatio','BadLegID','DupLegID','MixedRoots','OffMkt','CentVol','CentLeg','CentRng','CentSAtm','CentSpln','CentErr','NoRiskGrp','BadDDivs','NoPricer','CalcErr','TwapLate','TwapTime','NoAcctMap','UserUnk','UserHold','GTCHold','SysException','StkCrossed','BadOrdType','BadSSaleFlag','NoBorrow','NoFacilitateAccnt','UnknwnFut','MktNotOpen','NoRoutes','NoLocate','SSaleRstr','NoLegs','BadSide','BadLegKeyType','UnknwnRefStk','BadRefMktPrc','UnknwnRefFut','UnknwnRefAtm','BadRefVe','BadProdDef','StkOddLot','RiskException','MaxParticipation','MarExemptHold','NoMarRec','NullCounter','StkQty','FutQty','OptQty','StkDDelta','FutDDelta','OptDDelta','StkClsOnly','StkDisabled','FutClsOnly','FutDisabled','OptClsOnly','OptDisabled','OrderMargin','AccMargin','DayMargin','OpenExpose','DayLnDDelta','DayShDDelta','DayAbsDDelta','DayLnWtVega','DayShWtVega','DayAbsWtVega','DayLnNValue','DayShNValue','DayAbsNValue','AccFrozen','ConfigErr','NoFMFuture','NoLinkage','NoProdDef','BadRiskID','InvldAutoH','LegChange','CxlSpacing','BadHedgeInst','TooLateToReduce','PendCxlRepl','InvldCxlRepl','InvldCxl','DmaReject','NoUPrc','TwapSteps','UnknwnFirm','NoSSaleFlg','AccntNotMM','BadSource','VwapLate','AlreadyFilled','UnknownSecKey','InvldGTD','NotSupported','CutoffTime','ParentShape','NoFaceSide','NoFaceLegs','AuctionSize','InvldClFirm','BadLegBrkr','NoLegBrkr','StkLegNotAllowed','BadLeadSide','UnknwnRefUnd','ExecEngineType','NoExchAvail','SelfTrade','PointValueErr','PointCurrencyErr','StkCollar','FutCollar','OptCollar','LmtCollar','RefUPrcErr','InvldUser','InvldAccnt','UnknownCrossId','WidUMkt','UMktCls','UPrcRange','RiskCollarRng') NOT NULL DEFAULT 'None',
`spdrRejectLevel` ENUM('None','MarExsOnSponsLvl','MarExsOnSponsTkLvl','MarExsOnCoreLvl','MarExsOnCoreTkLvl','MarSponsOnCoreLvl','MarSponsOnCoreTkLvl','MarCoreOnCoreLvl','MarCoreOnCoreTkLvl','MarCoreOnSubLvl','MarCoreOnSubTkLvl','MarCoreOnAccntLvl','MarCoreOnAccntTkLvl','MarSubOnAccntLvl','MarSubOnAccntTkLvl','MarCoreOnCustomLvl','MarCoreOnCustomTkLvl','MarSubOnCustomLvl','MarSubOnCustomTkLvl','UserLvl','UserTkLvl','AccntLvl','AccntTkLvl','CFirmLvl','CFirmTkLvl','RiskGroup','HardLvl','SoftLvl','GblTkLvl') NOT NULL DEFAULT 'None',
`firmType` ENUM('None','Customer','Firm','MarketMaker','ProCustomer','BrokerDealer','AwayMM','FirmJBO','BrkrDlrCust') NOT NULL DEFAULT 'None',
`orderCapacity` ENUM('None','Agency','Principal','Individual','Proprietary','AgentOtherMember','RisklessPrincipal') NOT NULL DEFAULT 'None',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None' COMMENT 'primary short sale flag (single leg orders)',
`positionType` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None' COMMENT 'primary position type (single leg orders)',
`arriveFirmPos` INT NOT NULL DEFAULT 0 COMMENT 'firm position [resolved @ parent order arrival]',
`arriveSSaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None' COMMENT 'primary short sale flag (single leg orders) [resolved @ parent order arrival; short if any of order size would be short]',
`noCrossGroup` VARCHAR(16) NOT NULL DEFAULT '',
`exchTraderId` VARCHAR(16) NOT NULL DEFAULT '',
`largeTraderId` VARCHAR(16) NOT NULL DEFAULT '',
`tradingLocation` VARCHAR(16) NOT NULL DEFAULT '',
`firmPosition` INT NOT NULL DEFAULT 0,
`openSellSh` INT NOT NULL DEFAULT 0,
`locateQuan` INT NOT NULL DEFAULT 0 COMMENT 'available locate quantity (if selling short) @ arrival time',
`locateFirm` VARCHAR(6) NOT NULL DEFAULT '' COMMENT 'locate firm (usually an MPID)',
`locatePool` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'locate pool @ locate firm',
`clearingFirm` VARCHAR(4) NOT NULL DEFAULT '' COMMENT 'clearing firm [from AccountConfig; may not match parent execution]',
`clearingAccnt` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'clearing firm [from AccountConfig; may not match parent execution]',
`catReportable` ENUM('None','All','Stock','Options') NOT NULL DEFAULT 'None' COMMENT 'CAT reportable type (from AccountConfig.catReportable)',
`catSrcBrkrIMID` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'B/D firm FDID (only exists if a B/D is the source) (supplied by FINRA fbo client) (from ClientFirm.catSrcBrkrIMID)',
`catSrcAccntType` ENUM('None','Institutional','Employee','Foreign','Individual','MktMaking','FirmAvgPx','OtherProp','Error') NOT NULL DEFAULT 'None' COMMENT 'CAT account holder type (from AccountConfig.catSrcAccntType [Eqt, Opt])',
`catSrcFirmType` ENUM('None','Client','ClientBDAgency','ClientBDFirm','SRFirm') NOT NULL DEFAULT 'None' COMMENT 'CAT source type (from AccountConfig.catSrcType [Eqt, Opt])',
`catDestDeptType` ENUM('None','Exchange','Agency','ATS','DMA','Sponsored','Trading','Other') NOT NULL DEFAULT 'None' COMMENT 'Infer from ParentOrder Agency or ATS (BlockInitiate/BlockRespond)',
`catAccnt` TINYTEXT NOT NULL DEFAULT '' COMMENT 'CAT Firm Designated ID',
`catBrkrAccnt` TINYTEXT NOT NULL DEFAULT '' COMMENT 'Brokers CAT Firm Designated ID',
`cumFillQuantity` INT NOT NULL DEFAULT 0,
`avgFillPrice` DOUBLE NOT NULL DEFAULT 0,
`avgFillUPrice` DOUBLE NOT NULL DEFAULT 0,
`leavesQty` INT NOT NULL DEFAULT 0,
`lastFillNumber` BIGINT NOT NULL DEFAULT 0,
`lastFillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`reviewClOrdId` VARCHAR(24) NOT NULL DEFAULT '',
`reviewOrigClOrdId` VARCHAR(24) NOT NULL DEFAULT '',
`reviewCancelClOrdId` VARCHAR(24) NOT NULL DEFAULT '',
`reviewOrderSize` INT NOT NULL DEFAULT 0,
`reviewOrderActiveSize` INT NOT NULL DEFAULT 0,
`reviewCumFillQuantity` INT NOT NULL DEFAULT 0,
`reviewAvgFillPrice` DOUBLE NOT NULL DEFAULT 0,
`reviewLeavesQty` INT NOT NULL DEFAULT 0,
`reviewOrderStatus` ENUM('PendNew','New','PendClose','Closed','Rejected','SendReject') NOT NULL DEFAULT 'PendNew',
`maxProgress` ENUM('None','Initialize','Rejected','PreOpen','RiskHold','Working','ChkRte','RteRej','WaitAction','InMarket','Filling','Filled','PendingClose','Closed','HedgeHold') NOT NULL DEFAULT 'None',
`maxProgressDetail` VARCHAR(48) NOT NULL DEFAULT '',
`maxProgressTime` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`numChildOrders` INT NOT NULL DEFAULT 0 COMMENT '[is390Eligible] (numChildOrders > 0 if parent order is 390 Eligible and also generated at least 1 child order)',
`nbboBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'best nbbo bid @ arrival time',
`nbboAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'best nbbo ask @ arrival time',
`nbboBidSz` INT NOT NULL DEFAULT 0 COMMENT 'public cumulative bid size @ nbboBid',
`nbboAskSz` INT NOT NULL DEFAULT 0 COMMENT 'public cumulative ask size @ nbboAsk',
`mktStance` ENUM('None','ExchMrkt','NbboMrkt','ExchImpr','NbboImpr','ExchJoin','NbboJoin','Away') NOT NULL DEFAULT 'None',
`parentStrategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'client strategy [usually client supplied]',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'underlier (option only)',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'underlier (option only)',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'underlier (option only)',
`tickValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)',
`pointValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single point change in display premium (pointValue = tickValue / tickSize)',
`pointCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`notionalMult` FLOAT NOT NULL DEFAULT 0,
`securityID` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'from ProductDefinition.securityID',
`securityDesc` TINYTEXT NOT NULL DEFAULT '' COMMENT 'from ProductDefinition.securityDesc',
`productGroup` VARCHAR(6) NOT NULL DEFAULT '' COMMENT 'from ProductDefinition.productGroup',
`productClass` ENUM('None','Equity','Index','Future','Option','Spread') NOT NULL DEFAULT 'None' COMMENT 'from ProductDefinition.productClass',
`undKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'from ProductDefinition.undKey',
`undKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'from ProductDefinition.undKey',
`undKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'from ProductDefinition.undKey',
`undKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'from ProductDefinition.undKey',
`undKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'from ProductDefinition.undKey',
`undKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'from ProductDefinition.undKey',
`undType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None' COMMENT 'from ProductDefinition.undType',
`uSecDesc` VARCHAR(6) NOT NULL DEFAULT '' COMMENT '[options only] underlier security description',
`priceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`includeSRNetwork` ENUM('None','Include','Exclude','Disclose') NOT NULL DEFAULT 'None',
`DirectedCounterPartyList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(DirectedCounterPartyList)),
`OrderLegsList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(OrderLegsList)),
CONSTRAINT nonnegative_parentNumber CHECK(ASCII(parentNumber) < 56),
CONSTRAINT nonnegative_baseParentNumber CHECK(ASCII(baseParentNumber) < 56),
CONSTRAINT nonnegative_prevParentNumber CHECK(ASCII(prevParentNumber) < 56),
CONSTRAINT nonnegative_nextParentNumber CHECK(ASCII(nextParentNumber) < 56),
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
PRIMARY KEY USING HASH (`parentNumber`),
KEY `AccntCodeIndex` (`accnt`) USING HASH,
KEY `TickerCodeIndex` (`secKey_tk`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SpdrParentReport records contain the current state of a parent order and update as/when the order state changes.\nSpdrParentReport records are published to the SpiderRock elastic cluster when they reach a terminal state (closed, rejected, filled, etc.)';